﻿
using Blog.Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Blog.Controllers
{
    public class WBGController : Controller
    {
        // GET: WBG

        public ActionResult Index(int id)
        {
             using (UserEntities db = new UserEntities())
            {
                var user = db.Reg.Single(p=>p.Id==id);
                ViewBag.id = user.Id;
                ViewBag.name = user.Name;
                ViewBag.email = user.Email;
                ViewBag.self = user.self_introduction;
                ViewBag.Miaoshu = user.Miaoshu;
                ViewBag.Ava = user.Avatar;
                return View();
            }

        }
        public ActionResult jkl(int id)
        {
            using (UserEntities db = new UserEntities())
            {
                var user = db.Reg.Single(p => p.Id == id);
                ViewBag.id = user.Id;
                ViewBag.Ava = user.Avatar;
                return View();
            }
        }
       
        public ActionResult sbht(int id)
        {
            using (UserEntities db = new UserEntities())
            {
                var user = db.Reg.Single(p => p.Id == id);
                ViewBag.id = user.Id;

                return View();
            }
        }
        public ActionResult thy(int id)
        {
            using (UserEntities db = new UserEntities())
            {
                var user = db.Reg.Single(p => p.Id == id);
                ViewBag.id = user.Id;

                return View();
            }
        }
        public ActionResult shy(int id)
        {

            using (UserEntities db = new UserEntities())
            {
                var user = db.Reg.Single(p => p.Id == id);
                ViewBag.id = user.Id;

                return View();
            }
        }

        public ActionResult guanli(int id)
        {
            using (UserEntities db = new UserEntities())
            {
                var user = db.Reg.Single(p => p.Id == id);
                ViewBag.id = user.Id;
                ViewBag.Ava = user.Avatar;
                return View();
            }
        }
    }
}